<div class="layui-header">
  <div class="layui-logo" id="site-logo"><a href="{{route('home')}}" style="color: white;">Weibo APP</a></div>
  <!-- 头部区域（可配合layui已有的水平导航） -->
  <ul class="layui-nav layui-layout-left">
    <li class="layui-nav-item"><a href="{{route('users.index')}}">用户列表</a></li>
  </ul>
  @if(!Auth::check())
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item"><a href="{{route('help')}}">帮助</a></li>
      <li class="layui-nav-item"><a href="{{route('login')}}">登录</a></li>
    </ul>
  @else
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
          {{ Auth::user()->name }}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{{ route('users.show', Auth::user()) }}">基本资料</a></dd>
          <dd><a href="{{ route('users.edit', Auth::user()) }}">编辑资料</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="">
          <form action="{{ route('logout') }}" method="POST" class="layui-form">
            {{ csrf_field() }}
            {{ method_field('DELETE') }}
            <button class="layui-btn layui-btn-block btn-danger" type="submit" name="button">退出</button>
          </form>
        </a>
      </li>
    </ul>
    @endif
</div>
